<div  class="shopadd">
    <div class="container  contents bgw">
        <div class="col-sm-8 col-sm-offset-2 stepshow">
            <div class="step">
                <div class="stepover" style="width:0"></div>
                <div class="stepson step1 active">
                    <span>1</span>
                    <h5>设置基本资料</h5>
                </div>
                <div class="stepson step2">
                    <span>2</span>
                    <h5>分配店长账号</h5>
                </div>
                <div class="stepson step3">
                    <span>3</span>
                    <h5>完成</h5>
                </div>
            </div>
        </div>
        <form class="row" ng-submit="postSend()" name="add_form">
            <div class="col-md-12">
                <div class="col-sm-10 col-sm-offset-2 form-horizontal">
                    <div class="form-group">
                        <div class="col-sm-6 text-red col-sm-offset-2 ">*为必填项</div>
                    </div>
                    
                    <div class="form-group">
                        <label for="shopName" class="col-sm-2 control-label text-right">
                            <span class="text-red">*</span>
                            名称
                        </label>
                        <div class="col-sm-6" >
                        <input type="text" class="form-control" ng-model="posts.name" name="name" placeholder="请输入门店名称" ng-minlength='2' ng-maxlength='20' ng-pattern="config.textCheckJson.nickname" required></div>
                        <span class="help-block " ng-messages="add_form.name.$error"  ng-show="!add_form.name.$pristine||add_form.name.$touched">
	                        <div   ng-message="required">不能为空</div>
	                        <div class="text-red" ng-message="minlength">需大于2个字符</div>
	                        <div  class="text-red" ng-message="maxlength">需小于20字符</div>
	                        <div class="text-red" ng-message="pattern">
	                            <span  ng-bind="config.textCheckErrorJson.nickname"></span>
	                        </div>
                        </span>
                        <span class="help-block" ng-show="add_form.name.$valid">输入正确</span>
                        <span class="help-block"  ng-show="add_form.name.$untouched&&add_form.name.$pristine">
					 	2-20个字符以内
					 	</span>
                    </div>
                    <div class="form-group">
                        <label for="shopType" class="col-sm-2 control-label text-right">
                            <span class="text-red">*</span>
                            类型
                        </label>
                        <div class="col-sm-6 btn-checked" >
                            <div class="btn-group" >
                                <label class="btn btn-default " ng-repeat="shopt in  shopType"  ng-bind="shopt.text" ng-model="posts.shopType" btn-radio="{{shopt.code}}">
                                </label>
                            </div>
                        </div>
                        <!--
                        <div class="col-sm-4 ">
                            <div class="row">
                                <a class="btn btn-link" id="shoptype">查看门店类型</a>
                            </div>
                        </div>
                        -->
                    </div>
                    <div class="form-group">
                        <label for="shoptel" class="col-sm-2 control-label text-right">
                            <span class="text-red">*</span>
                            电话
                        </label>
                        <div class="col-sm-6" id="shoptel">
                        <input type="text" class="form-control" ng-model="posts.tel" name="Tel" placeholder="输入固定电话或手机号，固定电话可以加-" ng-minlength='2' ng-maxlength='20' ng-pattern="config.textCheckJson.telephone" id="shopTel" required></div>

                        <span class="help-block " ng-messages="add_form.Tel.$error" >
                        <div   ng-message="required">请输入正确的电话号码</div>
                        <div class="text-red" ng-message="minlength">需大于2个字符</div>
                        <div  class="text-red" ng-message="maxlength">需小于20字符</div>
                        <div class="text-red" ng-message="pattern">
                            <span  ng-bind="config.textCheckErrorJson.telephone"></span>
                        </div>
                        </span>
                        <span class="help-block" ng-show="add_form.Tel.$valid">输入正确</span>
                    </div>
                    <div class="form-group area ">
                        <label class="col-sm-2 control-label text-right">
                            <span class="text-red">*</span>
                            地区
                        </label>
                        <div class="col-sm-6">
                            <div class="row">
                                <div class="col-sm-4" ng-class="{'has-error':error.shopArea.code==0}" >
                                    <select ng-change="area1change()"  class="form-control" ng-model="area.area1"
                                        ng-options="item.code as   item.name for item in areaJson1" name="area" required>
                                        <option value="">--请选择--</option>
                                    </select>
                                </div>
                                <div class="col-sm-4" ng-show="area.area2" ng-if="areaJson2[0]">
                                    <select class="form-control" ng-model="area.area2"
                                    ng-options=" item.code as   item.name for item in areaJson2" ng-change="area2change()"></select>
                                </div>
                                <div class="col-sm-4" ng-show="posts.area" ng-if="areaJson3[0]">
                                    <select class="form-control" ng-model="posts.area"
                                    ng-options="item.code as  item.name for item in areaJson3"></select>
                                </div>
                                <span class="help-block " ng-messages="add_form.area.$error" >
                                <div   ng-message="required">请选择地区</div>
                                </span>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-10 col-sm-offset-2">
                        <div class="row">
                            <div class="col-sm-3">
                                <a class="btn btn-default btn-block" ng-click="goto('shops')">返回</a>
                            </div>
                            <div class="col-sm-3 col-sm-offset-1">
                                <button class="btn btn-danger btn-block" ng-disabled="!add_form.$valid">下一步</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>